home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
bootup
/
boot_a2m
/
beep
/
beep.doc
next >
Wrap
Text File
|
1995-05-02
|
4KB
|
133 lines
Beep
Copyright (C) 1990
By David Baggett
--------------------------------------------------------------------------------
User Contract
This program is FREE. You may distribute it at will, provided you
1) do not charge any money for it,
2) distribute it WITH the documentation, and
3) do not change the program or documentation in ANY WAY.
--------------------------------------------------------------------------------
Introduction
------------
In 1989, Dan Wilga released a Public Domain program called "newbell"
that replaced the boring "ding" sound the ST makes with a digitized
sound. Unfortunately, newbell only allowed certain playback speeds, all of
which were incompatible with sounds sampled on the Mac.
Here's a new program that does the same thing, but allows sample playback
speed to be specified in Hertz.
General Usage
-------------
Put beep.prg in your AUTO folder and create beep.inf with a standard
ASCII text editor. In beep.inf, put the name of the sample you want to
replace the system beep with and the playback speed in Hertz for the sample.
For example,
d:\usr\sounds\chbell.snd 8000
will replace the system beep with a church bell sample, played at 8000 Hertz.
Enabling and Disabling Beep
---------------------------
When beep.prg is invoked with no parameters, it reads the beep.inf
file and loads all the sounds. This typically occurs at bootup in the
AUTO folder. However, you can run beep.prg from a command shell (or
from the desktop if you rename a copy beep.ttp) as well. To turn
Beep off, type
beep off
from a command shell, or run beep.ttp from the desktop with parameter
"off".
Similary, type
beep on
to turn Beep back on.
Technical Information
---------------------
Beep steals Bios trap #13 and looks for Bconout(2, 7) calls. When it sees
one, it plays the sound.
Beep uses the bit six of the CONTERM system global (the byte at location
$484) for enabling and disabling itself. When the high bit is 1, Beep is on.
When the hight bit is 0, Beep is off. Whenever Beep is on it masks the normal
system beep by clearing the appropriate bit in CONTERM.
Beep is well-behaved and should work with all versions of TOS. It does
not use any undocumented memory locations.
Caveats
-------
It is a FEATURE that Beep does not turn off mouse interrupts when playing
the sound. (Otherwise you wouldn't be able to move the mouse until the
sound finished playing.) What this means, however, is that you can slow
down the playback by jiggling the mouse around while it's playing. Now
I don't want to hear any complaints about this, cause that's the way it's
gotta be!
Whenever you move the mouse, the processor is interrupted -- lots of
times, in fact. (Technically, once for each mouse pulse). The playback
routine taxes the 68000 and so the slightest interruption will slow the
playback down. Ain't nothin' I can do about it. 'Nuff said.
It's best to play samples at fairly low rates (e.g., 8000 or 11000 Hertz)
so that you don't completely bog down the system. Using samples at rates
above 11000 will often prevent the mouse from tracking correctly while the
sound is playing, and may cause weird things to happen to very CPU-intensive
applications. (To see this effect, select the "About..." box in TOS 1.4 and
click outside the dialog box with Beep on.)
Since the program uses bit six of the CONTERM variable, there wil be
problems if Atari decides to use this bit for something. (Specifically,
Beep will get turned off and on for no obvious reason.) This is the only
way Beep may be incompatible with future versions of TOS.
The program will not know it has already been installed if you
run it twice (or ten times) in a row. Doing so will use up more and
more memory.